package com.lecture.view.builder;

import org.apache.commons.beanutils.BeanUtils;

import com.lecture.hibernate.pojo.User;

import com.lecture.view.bean.UserBean;

public class UserBuilder {
	public static UserBean createUserBean(User user) throws Exception {
		UserBean userBean = new UserBean();
		
		try {
			BeanUtils.copyProperties(userBean, user);
		} catch (Exception e) {
			throw new Exception("Could not build UserBean " + e.toString(), e);
		}
		
		return userBean;
	}
}
